#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    bool isPalindrome(string s)
    {
        string str;
        for (int i = 0; i < s.size(); i++)
        {
            if (s[i] >= 'A' && s[i] <= 'Z')
            {
                s[i] = s[i] + 32;
            }
            if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= '0' && s[i] <= '9'))
            {
                str += s[i];
            }
        }
        int end = str.size() - 1;
        int begin = 0;
        while (begin < end)
        {
            if (str[begin] == str[end])
            {
                begin++;
                end--;
            }
            else
            {
                return false;
            }
        }
        return true;

    }
};